package org.lds.logger.xml;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class XMLLayout {
    @XStreamAlias("name")
    @XStreamAsAttribute
    private String name;

    @XStreamAlias("clazz")
    @XStreamAsAttribute
    private String clazz;

    @XStreamAlias("pattern")
    private String pattern;

    @XStreamAlias("charset")
    private String charset;

    @XStreamAlias("extJson")
    private String extJson;

    public XMLLayout(String name, String clazz, String pattern) {
        this(name, clazz, pattern, "UTF-8", null);
    }
}
